/*
 * ksTest.cpp
 *
 *  Created on: Aug 5, 2011
 *      Author: wang
 */

#include "ksDecode.h"

#include <iostream>
#include <fstream>
#include "ksContainerBlockReader.h"


using namespace std;

void ksDecode(const char* path, const char* result)
{
    ifstream input;
    input.open(path, ifstream::in | ifstream::binary);
    if (input.good())
    {
        ksContainerBlockReader* ksBlock = new ksContainerBlockReader();
        ksBlock->load(input);
        ksBlock->extract(result);
        cout << "success" << endl;
    }
    else
    {
        cout << "failed" << endl;
    }
    input.close();
}
